Skip to content

fix(extension): remove stranded matchPullRequestTarget duplicate from content.js (#8023) - #8054

Closed
kai392 wants to merge 1 commit into
JSONbored:mainfrom
kai392:fix/critical-issue-remove-dead-match-pr-target
Closed

fix(extension): remove stranded matchPullRequestTarget duplicate from content.js (#8023)#8054
kai392 wants to merge 1 commit into
JSONbored:mainfrom
kai392:fix/critical-issue-remove-dead-match-pr-target

Conversation

@kai392

@kai392 kai392 commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Remove matchPullRequestTarget from apps/loopover-extension/content.js — a stranded duplicate of matchGitHubPageTarget (minus the kind field) left behind by fix(extension): drop dead issue-page content-script match #7487's issue-page match removal, along with its __loopoverContentInternals entry.
  • Update the one real consumer the repo grep finds — test/unit/extension-content.test.ts — to stop exercising the removed duplicate. Its useful route coverage is preserved, not dropped: the /pull/146/files sub-page match and the bare /owner/repo no-match cases now pin matchGitHubPageTarget's regex directly, so the retired duplicate's assertions live on against the function that actually ships.
  • No behavior change: production code only ever called matchGitHubPageTarget; the deleted function was reachable solely through the test-internals hook.

Closes #8023

Test plan

  • npx vitest run test/unit/extension-content.test.ts — 5/5 passing against the updated internals surface
  • npm run extension:lint + npm run extension:typecheck (the CI checks gated on extension changes)
  • npm run typecheck
  • Repo-wide grep confirms zero remaining matchPullRequestTarget references
  • CI validate

@kai392
kai392 requested a review from JSONbored as a code owner July 22, 2026 16:31
@superagent-security

Copy link
Copy Markdown
Contributor

Superagent didn't find any vulnerabilities or security issues in this PR.

@loopover-orb loopover-orb Bot added the gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. label Jul 22, 2026
@loopover-orb

loopover-orb Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Caution

🛑 LoopOver review result - fixes required

Review updated: 2026-07-22 16:37:15 UTC

2 files · 1 AI reviewer · no blockers · CI failing · blocked

🛑 Suggested Action - Fix Blockers

Review summary
This PR deletes a genuinely dead function, matchPullRequestTarget, which duplicated matchGitHubPageTarget minus the kind field and was only reachable via the test-internals hook — production code always called matchGitHubPageTarget directly, confirmed by the full file content shown. The test file is updated correspondingly, pinning matchGitHubPageTarget's regex for the same three route cases (sub-page match, issue no-match, bare-repo no-match) so coverage is preserved rather than dropped. This is a small, well-scoped, low-risk cleanup that closes #8023 as claimed.

Nits — 2 non-blocking
  • The FAILED validate/validate-tests checks are marked '(no detail provided)' — no BASE BRANCH STATUS was given here, so the cause can't be attributed to staleness or content from what's visible; worth confirming manually since the stated test plan claims 5/5 passing locally.
  • Double check the failing CI checks (validate, validate-tests x3) locally since the PR's own test plan claims passing results — likely an environment or unrelated flake, but worth confirming before merge.

CI checks failing

  • validate
  • validate-tests (1)
  • validate-tests (3)
  • validate-tests (2)

Decision drivers

  • ✅ Code review — No blockers (1 reviewer)
  • ✅ Gate result — Passing (No configured blocker found.)
Context & advisory signals — never blocks the verdict
Signal Result Evidence
Linked issue ✅ Linked #8023
Related work ✅ No active overlap found No same-issue or scoped active PR overlap found.
Change scope ✅ 20/20 Low review scope from cached public metadata (1 linked issue).
Validation posture ✅ 25/25 PR body includes validation/test evidence.
Contributor workload ✅ 10/10 Author activity: 82 registered-repo PR(s), 47 merged, 0 issue(s).
Contributor context ✅ Confirmed Gittensor contributor kai392; Gittensor profile; 82 PR(s), 0 issue(s).
Improvement ✅ Minor risk: clean · value: minor · LLM: minor
Linked issue satisfaction

Addressed
The diff removes matchPullRequestTarget from content.js and drops its entry from __loopoverContentInternals, exactly as required, while also updating the sole test consumer so no stray references remain.

Review context
  • Author: kai392
  • Role context: outside_contributor
  • Public audience mode: oss maintainer
  • Lane context: Repository is configured for direct PR review.
  • Public profile languages: JavaScript, Kotlin, Perl, Python, TypeScript, Vue
  • Official Gittensor activity: 82 PR(s), 0 issue(s).
  • PR-specific overlap: none found.
Contributor next steps
  • Start here: Triage stale or unlinked PRs.
Signal definitions
  • Related work = same linked issue, overlapping active PRs, or title/path similarity.
  • Change scope = cached public metadata such as size labels, draft state, and review-burden hints.
  • Validation posture = whether the PR provides enough public validation/test evidence for maintainer review.
  • Contributor workload = public contributor activity and cleanup pressure, not a repo-wide quality failure.
  • Contributor context = public GitHub/Gittensor identity context; non-Gittensor status is not a blocker.
🧪 Chat with LoopOver

Ask LoopOver a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.

  • @loopover ask <question> answers contribution-quality Q&A with source citations and freshness.
  • @loopover chat <question> answers in natural prose from cached decision-pack facts via local inference (maintainer/collaborator; read-only).
  • A plain-language @loopover mention with a real question is routed to the closest matching read-only command automatically — no exact syntax required.

Full command reference: https://loopover.ai/docs/loopover-commands

🧪 Experimental — new and may change.

Visual preview
Route Viewport Before (production) After (this PR's preview) Diff
/ desktop before /
before /
after /
after /
/ mobile before / (mobile)
before / (mobile)
after / (mobile)
after / (mobile)

Click any thumbnail to open the full-size screenshot. Before = production · After = this PR's preview deploy.

Scroll preview
Route Before (production) After (this PR's preview)
/ before / (scroll)
before / (scroll)
after / (scroll)
after / (scroll)

A short scroll-through clip (desktop) — click either thumbnail to open the full animation. Evidence for scroll-linked behavior a single screenshot can't show.

🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed


💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →.

Checked by LoopOver, a quiet PR intelligence layer for OSS maintainers.

  • Re-run LoopOver review

@loopover-orb

loopover-orb Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

LoopOver is closing this pull request on the maintainer's behalf (CI is failing (validate, validate-tests (1), validate-tests (3), validate-tests (2))). This is an automated maintenance action — to pursue this change, please open a new pull request with the issues resolved. Closed PRs may be analyzed later to improve review accuracy, but they are not automatically reopened or re-reviewed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

matchPullRequestTarget is dead code left behind in loopover-extension/content.js by #7487's issue-page match removal

2 participants